#!/bin/bash

echo "show tables;" | mysql -u root mythconverg > tables.txt
rm -rf tables_extract
mkdir tables_extract
for table in `cat tables.txt`; do 
  echo $table
  echo "select * from $table ; " | mysql -u root mythconverg > tables_extract/$table.csv
done
